using System;
using System.Collections.Generic;
using System.Text;

namespace HREngine.Bots
{
	class Sim_GIL_134 : SimTemplate //* 圣水
	{
		//    verursacht $4 schaden.如果“圣水”杀死该随从，将它的复制置入你的手牌 
        
        public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            int dmg = (ownplay) ? p.getSpellDamageDamage(2) : p.getEnemySpellDamageDamage(2);

            bool summondemon = false;

            if (!target.isHero && dmg >= target.Hp && !target.divineshild && !target.immune)
            {
                summondemon = true;
            }

            p.minionGetDamageOrHeal(target, dmg);

            if (summondemon)
            {
				if (target.own && ownplay) p.drawACard(target.handcard.card.name, ownplay, true);
				else p.drawACard(target.handcard.card.name, ownplay, true);
			}
		}

	}
}